
Imports System.Drawing
Imports System.Drawing.Drawing2D
Public Class PenDashStyles


    Private Sub PenDashStyles_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        Dim cx As Integer = Me.Width
        Dim cy As Integer = Me.Height

        Dim pen As New Pen(Color.Black)
        pen.Width = 25
        For i As Integer = 0 To 5
            pen.DashStyle = i
            Dim y As Integer = (i + 1) * cy \ 6
            e.Graphics.DrawLine(pen, cx \ 8, y, 7 * cx \ 8, y)
        Next
    End Sub

    Private Sub PenDashStyles_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class